package com.app.web.socketio;

/**
 * 个人发送消息封装
 * Created by three on 14-9-30.
 */
public class PersonalMessage {
    private String userToken; // 用户标识，目前使用jessionid
    private int errorTimes = 0; // 发送失败，失败一定次数抛弃
    private String name;
    private Object data;

    PersonalMessage(String userToken, String name, Object data) {
        this.userToken = userToken;
        this.name = name;
        this.data = data;
    }

    public String getUserToken() {
        return userToken;
    }

    public void setUserToken(String userToken) {
        this.userToken = userToken;
    }

    public void errorIncr() {
        errorTimes++;
    }

    public int getErrorTimes() {
        return errorTimes;
    }

    public String getName() {
        return name;
    }

    public Object getData() {
        return data;
    }
}
